﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InternalClasses.Dynamic;
using InternalClasses.Context.Actions;

namespace DemoProject.CustomActions
{
    [global::System.AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = true)]
    public class CreateClassAction : MethodInjectionAction
    {
        public CreateClassAction()
        {
            base.InjectionType = InjectionType.BeforeSource;
            base.Method = typeof(CreateClassAction).GetMethod("CreateClass");
            base.Parameters = new object[] { };
        }

        public void CreateClass(object[] methodData, object[] metaData)
        {
            Test test = (Test)methodData[0];
            test.Text = "injected";
        }
    }
}
